.class public abstract Les/m7;
.super Ljava/lang/Object;
.source "MediaDecoder.java"

# interfaces
.implements Ljava/lang/Runnable;
.implements Lcom/esfile/screen/recorder/media/util/m;


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x15
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/m7$i;,
        Les/m7$h;
    }
.end annotation


# instance fields
.field private A:Z

.field private B:I

.field private C:Les/m7$h;

.field private D:Landroid/os/Handler;

.field private E:Les/m7$i;

.field private final a:Ljava/lang/Object;

.field private final b:Ljava/util/HashSet;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashSet<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private c:Landroid/media/MediaCodec$BufferInfo;

.field private d:Z

.field private e:Lcom/esfile/screen/recorder/media/util/n;

.field private f:Landroid/media/MediaExtractor;

.field private g:Z

.field private h:Z

.field private i:J

.field private volatile j:Z

.field private volatile k:Z

.field private volatile l:Z

.field private m:Z

.field private n:J

.field private o:J

.field private p:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/media/util/l;",
            ">;"
        }
    .end annotation
.end field

.field private q:I

.field private r:Ljava/lang/Exception;

.field private s:Z

.field private t:Landroid/media/MediaFormat;

.field private volatile u:Z

.field private volatile v:Z

.field private volatile w:Z

.field private volatile x:Z

.field private y:Z

.field private z:Z


# direct methods
.method public constructor <init>()V
    .locals 3

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Les/m7;->m:Z

    const-wide/16 v1, 0x0

    .line 4
    iput-wide v1, p0, Les/m7;->n:J

    const-wide/16 v1, -0x1

    .line 5
    iput-wide v1, p0, Les/m7;->o:J

    .line 6
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    iput-object v1, p0, Les/m7;->p:Ljava/util/List;

    .line 7
    iput v0, p0, Les/m7;->q:I

    const/4 v1, 0x0

    .line 8
    iput-object v1, p0, Les/m7;->r:Ljava/lang/Exception;

    .line 9
    iput-boolean v0, p0, Les/m7;->s:Z

    const/4 v2, 0x1

    .line 10
    iput-boolean v2, p0, Les/m7;->u:Z

    .line 11
    iput-boolean v0, p0, Les/m7;->v:Z

    .line 12
    iput-boolean v0, p0, Les/m7;->w:Z

    .line 13
    iput-boolean v2, p0, Les/m7;->x:Z

    .line 14
    iput-boolean v0, p0, Les/m7;->y:Z

    .line 15
    iput-boolean v0, p0, Les/m7;->z:Z

    .line 16
    iput-boolean v0, p0, Les/m7;->A:Z

    const/4 v0, -0x1

    .line 17
    iput v0, p0, Les/m7;->B:I

    .line 18
    iput-object v1, p0, Les/m7;->D:Landroid/os/Handler;

    .line 19
    new-instance v0, Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {v0}, Landroid/media/MediaCodec$BufferInfo;-><init>()V

    iput-object v0, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    .line 20
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    iput-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.h263.sw.dec"

    .line 21
    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 22
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.avc.sw.dec"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 23
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.mpeg4.sw.dec"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 24
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.vc1.sw.dec"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 25
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.wmv7.dec"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 26
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.wmv8.dec"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 27
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.mp43.dec"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 28
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.h263sr.dec"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 29
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.SEC.vp8.dec"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 30
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.google.h264.decoder"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 31
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.google.mpeg4.decoder"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 32
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.google.h263.decoder"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 33
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.google.vp8.decoder"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 34
    iget-object v0, p0, Les/m7;->b:Ljava/util/HashSet;

    const-string v1, "OMX.google.vp9.decoder"

    invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    return-void
.end method

.method private a(J)J
    .locals 2

    .line 20
    iget-boolean v0, p0, Les/m7;->s:Z

    if-eqz v0, :cond_0

    const-wide/16 v0, 0x3e8

    div-long/2addr p1, v0

    mul-long p1, p1, v0

    :cond_0
    return-wide p1
.end method

.method private static a(ZLjava/lang/String;)Ljava/lang/String;
    .locals 2

    .line 43
    new-instance v0, Ljava/lang/StringBuffer;

    invoke-direct {v0}, Ljava/lang/StringBuffer;-><init>()V

    const-string v1, "["

    .line 44
    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    if-eqz p0, :cond_0

    const-string p0, "audio"

    goto :goto_0

    :cond_0
    const-string p0, "video"

    :goto_0
    invoke-virtual {v0, p0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    const-string p0, "]"

    invoke-virtual {v0, p0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 45
    invoke-virtual {v0, p1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 46
    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method private a(ILjava/nio/ByteBuffer;Landroid/media/MediaCodec$BufferInfo;Z)V
    .locals 19

    move-object/from16 v7, p0

    move/from16 v0, p1

    move-object/from16 v8, p3

    .line 21
    iget-object v1, v7, Les/m7;->C:Les/m7$h;

    const/4 v9, 0x1

    if-eqz v1, :cond_3

    .line 22
    iget-object v10, v7, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v10

    .line 23
    :try_start_0
    iget-object v1, v7, Les/m7;->p:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v1

    const/4 v11, 0x0

    if-eqz v1, :cond_0

    .line 24
    new-instance v12, Lcom/esfile/screen/recorder/media/util/l;

    iget-wide v5, v8, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    move-object v1, v12

    move-object/from16 v2, p0

    move/from16 v3, p1

    move-object/from16 v4, p2

    invoke-direct/range {v1 .. v6}, Lcom/esfile/screen/recorder/media/util/l;-><init>(Lcom/esfile/screen/recorder/media/util/m;ILjava/nio/ByteBuffer;J)V

    .line 25
    new-instance v13, Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {v13}, Landroid/media/MediaCodec$BufferInfo;-><init>()V

    iput-object v13, v12, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    .line 26
    iget v14, v8, Landroid/media/MediaCodec$BufferInfo;->offset:I

    iget v15, v8, Landroid/media/MediaCodec$BufferInfo;->size:I

    iget-wide v1, v8, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget v3, v8, Landroid/media/MediaCodec$BufferInfo;->flags:I

    move-wide/from16 v16, v1

    move/from16 v18, v3

    invoke-virtual/range {v13 .. v18}, Landroid/media/MediaCodec$BufferInfo;->set(IIJI)V

    goto :goto_0

    .line 27
    :cond_0
    iget-object v1, v7, Les/m7;->p:Ljava/util/List;

    invoke-interface {v1, v11}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v1

    move-object v12, v1

    check-cast v12, Lcom/esfile/screen/recorder/media/util/l;

    move-object/from16 v1, p2

    .line 28
    iput-object v1, v12, Lcom/esfile/screen/recorder/media/util/l;->b:Ljava/nio/ByteBuffer;

    .line 29
    iget-wide v1, v8, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iput-wide v1, v12, Lcom/esfile/screen/recorder/media/util/l;->c:J

    .line 30
    iput v0, v12, Lcom/esfile/screen/recorder/media/util/l;->d:I

    .line 31
    iget-object v13, v12, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget v14, v8, Landroid/media/MediaCodec$BufferInfo;->offset:I

    iget v15, v8, Landroid/media/MediaCodec$BufferInfo;->size:I

    iget-wide v1, v8, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget v3, v8, Landroid/media/MediaCodec$BufferInfo;->flags:I

    move-wide/from16 v16, v1

    move/from16 v18, v3

    invoke-virtual/range {v13 .. v18}, Landroid/media/MediaCodec$BufferInfo;->set(IIJI)V

    .line 32
    :goto_0
    monitor-exit v10
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 33
    iget-wide v1, v8, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget-wide v3, v7, Les/m7;->n:J

    cmp-long v5, v1, v3

    if-gez v5, :cond_2

    if-nez p4, :cond_2

    iget-boolean v1, v7, Les/m7;->z:Z

    if-eqz v1, :cond_1

    goto :goto_1

    .line 34
    :cond_1
    iget-object v1, v7, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v1, v0, v11}, Lcom/esfile/screen/recorder/media/util/n;->a(IZ)V

    goto :goto_2

    .line 35
    :cond_2
    :goto_1
    iget-object v1, v7, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v1

    .line 36
    :try_start_1
    iget v0, v7, Les/m7;->q:I

    add-int/2addr v0, v9

    iput v0, v7, Les/m7;->q:I

    .line 37
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 38
    invoke-direct {v7, v12}, Les/m7;->a(Lcom/esfile/screen/recorder/media/util/l;)V

    goto :goto_2

    :catchall_0
    move-exception v0

    .line 39
    :try_start_2
    monitor-exit v1
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw v0

    :catchall_1
    move-exception v0

    .line 40
    :try_start_3
    monitor-exit v10
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    throw v0

    .line 41
    :cond_3
    iget-object v1, v7, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v1, v0, v9}, Lcom/esfile/screen/recorder/media/util/n;->a(IZ)V

    :goto_2
    return-void
.end method

.method private a(Lcom/esfile/screen/recorder/media/util/l;)V
    .locals 3

    .line 66
    iget-object v0, p0, Les/m7;->C:Les/m7$h;

    if-eqz v0, :cond_1

    .line 67
    iget-object v1, p0, Les/m7;->D:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 68
    new-instance v2, Les/m7$f;

    invoke-direct {v2, p0, v0, p1}, Les/m7$f;-><init>(Les/m7;Les/m7$h;Lcom/esfile/screen/recorder/media/util/l;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 69
    :cond_0
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    invoke-interface {v0, p0, v1, p1}, Les/m7$h;->a(Les/m7;ZLcom/esfile/screen/recorder/media/util/l;)V

    :cond_1
    :goto_0
    return-void
.end method

.method private a(Ljava/lang/Exception;)V
    .locals 3

    .line 62
    iget-object v0, p0, Les/m7;->C:Les/m7$h;

    if-eqz v0, :cond_1

    .line 63
    iget-object v1, p0, Les/m7;->D:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 64
    new-instance v2, Les/m7$c;

    invoke-direct {v2, p0, v0, p1}, Les/m7$c;-><init>(Les/m7;Les/m7$h;Ljava/lang/Exception;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 65
    :cond_0
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    invoke-interface {v0, p0, v1, p1}, Les/m7$h;->a(Les/m7;ZLjava/lang/Exception;)V

    :cond_1
    :goto_0
    return-void
.end method

.method private a(Ljava/lang/String;Ljava/lang/Exception;)V
    .locals 1

    .line 47
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v0

    invoke-static {v0, p1}, Les/m7;->a(ZLjava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v0, "mdr"

    invoke-static {v0, p1, p2}, Lcom/esfile/screen/recorder/media/util/k;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    return-void
.end method

.method private b(Landroid/media/MediaFormat;)V
    .locals 3

    .line 8
    iget-object v0, p0, Les/m7;->C:Les/m7$h;

    if-eqz v0, :cond_1

    .line 9
    iget-object v1, p0, Les/m7;->D:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 10
    new-instance v2, Les/m7$d;

    invoke-direct {v2, p0, v0, p1}, Les/m7$d;-><init>(Les/m7;Les/m7$h;Landroid/media/MediaFormat;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 11
    :cond_0
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    invoke-interface {v0, p0, v1, p1}, Les/m7$h;->b(Les/m7;ZLandroid/media/MediaFormat;)V

    :cond_1
    :goto_0
    return-void
.end method

.method private c(Landroid/media/MediaFormat;)V
    .locals 3

    .line 3
    iget-object v0, p0, Les/m7;->C:Les/m7$h;

    if-eqz v0, :cond_1

    .line 4
    iget-object v1, p0, Les/m7;->D:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 5
    new-instance v2, Les/m7$e;

    invoke-direct {v2, p0, v0, p1}, Les/m7$e;-><init>(Les/m7;Les/m7$h;Landroid/media/MediaFormat;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 6
    :cond_0
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    invoke-interface {v0, p0, v1, p1}, Les/m7$h;->a(Les/m7;ZLandroid/media/MediaFormat;)V

    :cond_1
    :goto_0
    return-void
.end method

.method private c(Ljava/lang/String;)V
    .locals 1

    .line 2
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v0

    invoke-static {v0, p1}, Les/m7;->a(ZLjava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v0, "mdr"

    invoke-static {v0, p1}, Lcom/esfile/screen/recorder/media/util/k;->d(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method private d(Landroid/media/MediaFormat;)V
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "onInputFormatReceived "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Les/m7;->a(Ljava/lang/String;)V

    .line 2
    invoke-direct {p0, p1}, Les/m7;->b(Landroid/media/MediaFormat;)V

    return-void
.end method

.method private m()Z
    .locals 9

    .line 1
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    const/4 v1, 0x0

    if-eqz v0, :cond_c

    iget-boolean v0, p0, Les/m7;->h:Z

    if-nez v0, :cond_c

    iget-boolean v0, p0, Les/m7;->j:Z

    if-nez v0, :cond_c

    iget-object v0, p0, Les/m7;->r:Ljava/lang/Exception;

    if-nez v0, :cond_c

    iget-boolean v0, p0, Les/m7;->k:Z

    if-eqz v0, :cond_0

    goto/16 :goto_3

    .line 2
    :cond_0
    :try_start_0
    iget v0, p0, Les/m7;->B:I

    if-ltz v0, :cond_1

    iget v0, p0, Les/m7;->B:I

    goto :goto_0

    :cond_1
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    iget-object v2, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    const-wide/16 v3, 0x2710

    invoke-virtual {v0, v2, v3, v4}, Lcom/esfile/screen/recorder/media/util/n;->a(Landroid/media/MediaCodec$BufferInfo;J)I

    move-result v0

    :goto_0
    const/4 v2, -0x2

    if-ltz v0, :cond_2

    .line 3
    iget-boolean v3, p0, Les/m7;->A:Z

    if-nez v3, :cond_2

    .line 4
    iput v0, p0, Les/m7;->B:I

    const/4 v0, -0x2

    :cond_2
    const/4 v3, 0x1

    if-ltz v0, :cond_8

    const/4 v2, -0x1

    .line 5
    iput v2, p0, Les/m7;->B:I

    .line 6
    iget-object v2, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v2, v0}, Lcom/esfile/screen/recorder/media/util/n;->b(I)Ljava/nio/ByteBuffer;

    move-result-object v2

    .line 7
    iget-object v4, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    iget v4, v4, Landroid/media/MediaCodec$BufferInfo;->flags:I

    and-int/lit8 v4, v4, 0x4

    if-nez v4, :cond_4

    .line 8
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v4

    if-nez v4, :cond_3

    iget-wide v4, p0, Les/m7;->i:J

    const-wide/16 v6, 0x0

    cmp-long v8, v4, v6

    if-ltz v8, :cond_3

    iget-object v4, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    iget-wide v4, v4, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    iget-wide v6, p0, Les/m7;->i:J

    cmp-long v8, v4, v6

    if-nez v8, :cond_3

    goto :goto_1

    :cond_3
    const/4 v4, 0x0

    goto :goto_2

    :cond_4
    :goto_1
    const/4 v4, 0x1

    :goto_2
    if-eqz v4, :cond_6

    .line 9
    iget-object v5, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    iget v6, v5, Landroid/media/MediaCodec$BufferInfo;->flags:I

    or-int/lit8 v6, v6, 0x4

    iput v6, v5, Landroid/media/MediaCodec$BufferInfo;->flags:I

    .line 10
    iget-object v5, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    iget v5, v5, Landroid/media/MediaCodec$BufferInfo;->size:I

    if-gtz v5, :cond_6

    if-eqz v2, :cond_5

    .line 11
    invoke-virtual {v2, v1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;

    .line 12
    invoke-virtual {v2, v1}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;

    .line 13
    :cond_5
    iget-object v5, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    iput v1, v5, Landroid/media/MediaCodec$BufferInfo;->size:I

    .line 14
    :cond_6
    iget-object v5, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {p0, v0, v2, v5, v4}, Les/m7;->a(ILjava/nio/ByteBuffer;Landroid/media/MediaCodec$BufferInfo;Z)V

    if-eqz v4, :cond_7

    .line 15
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "saw output EOS. <"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    iget v2, v2, Landroid/media/MediaCodec$BufferInfo;->size:I

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v2, " "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Les/m7;->c:Landroid/media/MediaCodec$BufferInfo;

    iget-wide v5, v2, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    invoke-virtual {v0, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v2, ">"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Les/m7;->a(Ljava/lang/String;)V

    .line 16
    invoke-virtual {p0}, Les/m7;->f()V

    .line 17
    iput-boolean v3, p0, Les/m7;->h:Z

    .line 18
    invoke-direct {p0}, Les/m7;->q()V

    :cond_7
    xor-int/lit8 v0, v4, 0x1

    return v0

    :cond_8
    if-ne v0, v2, :cond_a

    .line 19
    iget-boolean v0, p0, Les/m7;->A:Z

    if-nez v0, :cond_9

    .line 20
    iput-boolean v3, p0, Les/m7;->A:Z

    .line 21
    invoke-direct {p0}, Les/m7;->o()V
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_9
    return v3

    :cond_a
    const/4 v2, -0x3

    if-ne v0, v2, :cond_b

    return v3

    :cond_b
    return v1

    :catch_0
    move-exception v0

    .line 22
    invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V

    .line 23
    iput-object v0, p0, Les/m7;->r:Ljava/lang/Exception;

    .line 24
    invoke-virtual {p0}, Les/m7;->stop()V

    :cond_c
    :goto_3
    return v1
.end method

.method private n()Z
    .locals 14

    .line 1
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    const/4 v1, 0x0

    if-eqz v0, :cond_8

    iget-boolean v0, p0, Les/m7;->g:Z

    if-nez v0, :cond_8

    iget-boolean v0, p0, Les/m7;->j:Z

    if-nez v0, :cond_8

    iget-object v0, p0, Les/m7;->r:Ljava/lang/Exception;

    if-nez v0, :cond_8

    iget-boolean v0, p0, Les/m7;->k:Z

    if-eqz v0, :cond_0

    goto/16 :goto_2

    .line 2
    :cond_0
    :try_start_0
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    const-wide/16 v2, 0x2710

    invoke-virtual {v0, v2, v3}, Lcom/esfile/screen/recorder/media/util/n;->a(J)I

    move-result v5

    if-ltz v5, :cond_8

    .line 3
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v0, v5}, Lcom/esfile/screen/recorder/media/util/n;->a(I)Ljava/nio/ByteBuffer;

    move-result-object v0

    if-eqz v0, :cond_8

    .line 4
    iget-object v2, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v2, v0, v1}, Landroid/media/MediaExtractor;->readSampleData(Ljava/nio/ByteBuffer;I)I

    move-result v0

    .line 5
    iget-object v2, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v2}, Landroid/media/MediaExtractor;->getSampleTime()J

    move-result-wide v2

    .line 6
    iget-object v4, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v4}, Landroid/media/MediaExtractor;->advance()Z

    .line 7
    iget-object v4, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v4}, Landroid/media/MediaExtractor;->getSampleTime()J

    move-result-wide v6

    const-wide/16 v8, 0x0

    const/4 v11, 0x1

    cmp-long v4, v6, v8

    if-ltz v4, :cond_2

    .line 8
    iget-wide v12, p0, Les/m7;->o:J

    cmp-long v4, v12, v8

    if-ltz v4, :cond_1

    iget-wide v12, p0, Les/m7;->o:J

    cmp-long v4, v6, v12

    if-lez v4, :cond_1

    goto :goto_0

    :cond_1
    const/4 v12, 0x0

    goto :goto_1

    :cond_2
    :goto_0
    const/4 v12, 0x1

    .line 9
    :goto_1
    iget-boolean v4, p0, Les/m7;->y:Z

    if-nez v4, :cond_3

    if-eqz v12, :cond_3

    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v4

    if-nez v4, :cond_3

    .line 10
    iput-boolean v11, p0, Les/m7;->z:Z

    .line 11
    :cond_3
    iget-wide v6, p0, Les/m7;->o:J

    cmp-long v4, v6, v8

    if-ltz v4, :cond_4

    invoke-direct {p0, v2, v3}, Les/m7;->a(J)J

    move-result-wide v6

    iget-wide v8, p0, Les/m7;->o:J

    cmp-long v4, v6, v8

    if-lez v4, :cond_4

    iget-boolean v4, p0, Les/m7;->z:Z

    if-nez v4, :cond_4

    const/4 v0, 0x0

    :cond_4
    if-lez v0, :cond_7

    .line 12
    iget-wide v6, p0, Les/m7;->n:J

    cmp-long v4, v2, v6

    if-ltz v4, :cond_5

    .line 13
    iput-boolean v11, p0, Les/m7;->y:Z

    .line 14
    :cond_5
    iget-object v4, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    const/4 v6, 0x0

    const/4 v10, 0x0

    move v7, v0

    move-wide v8, v2

    invoke-virtual/range {v4 .. v10}, Lcom/esfile/screen/recorder/media/util/n;->a(IIIJI)V

    if-eqz v12, :cond_6

    .line 15
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v4

    if-nez v4, :cond_6

    .line 16
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "saw input EOS ~1. <"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, " "

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v0, ">"

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Les/m7;->a(Ljava/lang/String;)V

    .line 17
    iput-wide v2, p0, Les/m7;->i:J

    :cond_6
    return v11

    :cond_7
    const-string v0, "saw input EOS ~2."

    .line 18
    invoke-virtual {p0, v0}, Les/m7;->a(Ljava/lang/String;)V

    .line 19
    iget-object v4, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    const/4 v6, 0x0

    const/4 v7, 0x0

    const-wide/16 v8, 0x0

    const/4 v10, 0x4

    invoke-virtual/range {v4 .. v10}, Lcom/esfile/screen/recorder/media/util/n;->a(IIIJI)V

    .line 20
    iput-boolean v11, p0, Les/m7;->g:Z
    :try_end_0
    .catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_2

    :catch_0
    move-exception v0

    .line 21
    invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V

    .line 22
    iput-object v0, p0, Les/m7;->r:Ljava/lang/Exception;

    .line 23
    invoke-virtual {p0}, Les/m7;->stop()V

    :cond_8
    :goto_2
    return v1
.end method

.method private o()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/media/util/n;->g()Landroid/media/MediaFormat;

    move-result-object v0

    .line 2
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "output format has changed to "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Les/m7;->c(Ljava/lang/String;)V

    .line 3
    invoke-direct {p0, v0}, Les/m7;->c(Landroid/media/MediaFormat;)V

    .line 4
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    if-eqz v1, :cond_0

    const-string v1, "channel-count"

    .line 5
    invoke-static {v0, v1}, Lcom/esfile/screen/recorder/media/util/s;->b(Landroid/media/MediaFormat;Ljava/lang/String;)I

    move-result v0

    const/4 v1, 0x2

    if-le v0, v1, :cond_0

    .line 6
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "media_sdk"

    const-string v2, "audio_mult_ch"

    invoke-static {v1, v2, v0}, Les/la;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method private p()V
    .locals 9

    .line 1
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-boolean v1, p0, Les/m7;->j:Z

    const/4 v2, 0x1

    const/4 v3, 0x0

    if-nez v1, :cond_0

    iget-boolean v1, p0, Les/m7;->v:Z

    if-eqz v1, :cond_0

    .line 3
    iput-boolean v3, p0, Les/m7;->v:Z

    const/4 v1, 0x1

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    .line 4
    :goto_0
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    if-eqz v1, :cond_8

    .line 5
    iget-object v0, p0, Les/m7;->E:Les/m7$i;

    if-eqz v0, :cond_1

    .line 6
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    invoke-interface {v0, p0, v1}, Les/m7$i;->a(Les/m7;Z)V

    .line 7
    :cond_1
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    if-eqz v0, :cond_2

    .line 8
    iget-wide v4, p0, Les/m7;->n:J

    invoke-virtual {v0}, Landroid/media/MediaExtractor;->getSampleTime()J

    move-result-wide v0

    cmp-long v6, v4, v0

    if-eqz v6, :cond_2

    .line 9
    invoke-direct {p0}, Les/m7;->t()V

    .line 10
    iget-boolean v0, p0, Les/m7;->m:Z

    if-nez v0, :cond_3

    .line 11
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v0}, Landroid/media/MediaExtractor;->getSampleTime()J

    move-result-wide v0

    iput-wide v0, p0, Les/m7;->n:J

    .line 12
    iget-wide v4, p0, Les/m7;->o:J

    const-wide/16 v6, 0x0

    cmp-long v8, v4, v6

    if-ltz v8, :cond_3

    cmp-long v6, v0, v4

    if-lez v6, :cond_3

    .line 13
    iput-wide v0, p0, Les/m7;->o:J

    goto :goto_1

    :cond_2
    const/4 v2, 0x0

    .line 14
    :cond_3
    :goto_1
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v0, :cond_7

    iget-boolean v0, p0, Les/m7;->x:Z

    if-nez v0, :cond_7

    iget-boolean v0, p0, Les/m7;->g:Z

    if-nez v0, :cond_4

    iget-boolean v0, p0, Les/m7;->h:Z

    if-nez v0, :cond_4

    if-eqz v2, :cond_7

    .line 15
    :cond_4
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 16
    :try_start_1
    iget v1, p0, Les/m7;->q:I

    if-lez v1, :cond_5

    .line 17
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "wait for all buffers back. count: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Les/m7;->q:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Les/m7;->a(Ljava/lang/String;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 18
    :cond_5
    :goto_2
    :try_start_2
    iget-boolean v1, p0, Les/m7;->j:Z

    if-nez v1, :cond_6

    iget v1, p0, Les/m7;->q:I

    if-lez v1, :cond_6

    .line 19
    iget-object v1, p0, Les/m7;->a:Ljava/lang/Object;

    const-wide/16 v4, 0xa

    invoke-virtual {v1, v4, v5}, Ljava/lang/Object;->wait(J)V
    :try_end_2
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_2

    .line 20
    :catch_0
    :cond_6
    :try_start_3
    monitor-exit v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    const-string v0, "flush MediaCodec"

    .line 21
    invoke-virtual {p0, v0}, Les/m7;->a(Ljava/lang/String;)V

    .line 22
    :try_start_4
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v0, :cond_7

    .line 23
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/media/util/n;->b()V
    :try_end_4
    .catch Ljava/lang/IllegalStateException; {:try_start_4 .. :try_end_4} :catch_1

    goto :goto_3

    :catch_1
    move-exception v0

    .line 24
    invoke-virtual {v0}, Ljava/lang/IllegalStateException;->printStackTrace()V

    goto :goto_3

    :catchall_0
    move-exception v1

    .line 25
    :try_start_5
    monitor-exit v0
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    throw v1

    .line 26
    :cond_7
    :goto_3
    iput-boolean v3, p0, Les/m7;->y:Z

    .line 27
    iput-boolean v3, p0, Les/m7;->z:Z

    .line 28
    iput-boolean v3, p0, Les/m7;->g:Z

    .line 29
    iput-boolean v3, p0, Les/m7;->h:Z

    const-wide/16 v0, -0x1

    .line 30
    iput-wide v0, p0, Les/m7;->i:J

    :cond_8
    return-void

    :catchall_1
    move-exception v1

    .line 31
    :try_start_6
    monitor-exit v0
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_1

    goto :goto_5

    :goto_4
    throw v1

    :goto_5
    goto :goto_4
.end method

.method private q()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/m7;->C:Les/m7$h;

    if-eqz v0, :cond_1

    .line 2
    iget-object v1, p0, Les/m7;->D:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 3
    new-instance v2, Les/m7$g;

    invoke-direct {v2, p0, v0}, Les/m7$g;-><init>(Les/m7;Les/m7$h;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 4
    :cond_0
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    invoke-interface {v0, p0, v1}, Les/m7$h;->c(Les/m7;Z)V

    :cond_1
    :goto_0
    return-void
.end method

.method private r()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/m7;->C:Les/m7$h;

    if-eqz v0, :cond_1

    .line 2
    iget-object v1, p0, Les/m7;->D:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 3
    new-instance v2, Les/m7$a;

    invoke-direct {v2, p0, v0}, Les/m7$a;-><init>(Les/m7;Les/m7$h;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 4
    :cond_0
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    invoke-interface {v0, p0, v1}, Les/m7$h;->a(Les/m7;Z)V

    :cond_1
    :goto_0
    return-void
.end method

.method private s()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/m7;->C:Les/m7$h;

    if-eqz v0, :cond_1

    .line 2
    iget-object v1, p0, Les/m7;->D:Landroid/os/Handler;

    if-eqz v1, :cond_0

    .line 3
    new-instance v2, Les/m7$b;

    invoke-direct {v2, p0, v0}, Les/m7$b;-><init>(Les/m7;Les/m7$h;)V

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 4
    :cond_0
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v1

    invoke-interface {v0, p0, v1}, Les/m7$h;->b(Les/m7;Z)V

    :cond_1
    :goto_0
    return-void
.end method

.method private t()V
    .locals 7

    .line 1
    iget-boolean v0, p0, Les/m7;->m:Z

    const/4 v1, 0x2

    if-eqz v0, :cond_2

    .line 2
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    iget-wide v2, p0, Les/m7;->n:J

    const/4 v4, 0x0

    invoke-virtual {v0, v2, v3, v4}, Landroid/media/MediaExtractor;->seekTo(JI)V

    .line 3
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v0

    if-nez v0, :cond_3

    .line 4
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v0}, Landroid/media/MediaExtractor;->getSampleTime()J

    move-result-wide v2

    iget-wide v5, p0, Les/m7;->n:J

    cmp-long v0, v2, v5

    if-lez v0, :cond_0

    .line 5
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    const/4 v2, 0x1

    invoke-virtual {v0, v5, v6, v2}, Landroid/media/MediaExtractor;->seekTo(JI)V

    .line 6
    :cond_0
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v0}, Landroid/media/MediaExtractor;->getSampleTime()J

    move-result-wide v2

    iget-wide v5, p0, Les/m7;->n:J

    cmp-long v0, v2, v5

    if-lez v0, :cond_1

    .line 7
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v0, v5, v6, v1}, Landroid/media/MediaExtractor;->seekTo(JI)V

    .line 8
    :cond_1
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v0}, Landroid/media/MediaExtractor;->getSampleTime()J

    move-result-wide v0

    iget-wide v2, p0, Les/m7;->n:J

    cmp-long v5, v0, v2

    if-lez v5, :cond_3

    .line 9
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v0, v2, v3, v4}, Landroid/media/MediaExtractor;->seekTo(JI)V

    goto :goto_0

    .line 10
    :cond_2
    iget-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    iget-wide v2, p0, Les/m7;->n:J

    invoke-virtual {v0, v2, v3, v1}, Landroid/media/MediaExtractor;->seekTo(JI)V

    :cond_3
    :goto_0
    return-void
.end method


# virtual methods
.method protected abstract a(Landroid/media/MediaExtractor;)Landroid/media/MediaFormat;
.end method

.method protected abstract a(Landroid/media/MediaFormat;)Lcom/esfile/screen/recorder/media/util/n;
.end method

.method public a()V
    .locals 2

    .line 14
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    :try_start_0
    const-string v1, "flush media decoder"

    .line 15
    invoke-virtual {p0, v1}, Les/m7;->a(Ljava/lang/String;)V

    .line 16
    iget-boolean v1, p0, Les/m7;->j:Z

    if-eqz v1, :cond_0

    .line 17
    monitor-exit v0

    return-void

    :cond_0
    const/4 v1, 0x1

    .line 18
    iput-boolean v1, p0, Les/m7;->v:Z

    .line 19
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public a(JJ)V
    .locals 7

    const/4 v5, 0x1

    const/4 v6, 0x1

    move-object v0, p0

    move-wide v1, p1

    move-wide v3, p3

    .line 1
    invoke-virtual/range {v0 .. v6}, Les/m7;->a(JJZZ)V

    return-void
.end method

.method public a(JJZ)V
    .locals 7

    const/4 v6, 0x1

    move-object v0, p0

    move-wide v1, p1

    move-wide v3, p3

    move v5, p5

    .line 2
    invoke-virtual/range {v0 .. v6}, Les/m7;->a(JJZZ)V

    return-void
.end method

.method public a(JJZZ)V
    .locals 2

    const-wide/16 v0, 0x0

    .line 3
    invoke-static {p1, p2, v0, v1}, Ljava/lang/Math;->max(JJ)J

    move-result-wide p1

    iput-wide p1, p0, Les/m7;->n:J

    .line 4
    iput-wide p3, p0, Les/m7;->o:J

    .line 5
    iput-boolean p5, p0, Les/m7;->m:Z

    if-nez p6, :cond_0

    .line 6
    iget-boolean p1, p0, Les/m7;->h:Z

    if-nez p1, :cond_0

    iget-boolean p1, p0, Les/m7;->g:Z

    if-eqz p1, :cond_1

    .line 7
    :cond_0
    invoke-virtual {p0}, Les/m7;->a()V

    :cond_1
    return-void
.end method

.method public a(Lcom/esfile/screen/recorder/media/util/l;Z)V
    .locals 4

    .line 48
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 49
    :try_start_0
    iget v1, p0, Les/m7;->q:I

    const/4 v2, 0x1

    sub-int/2addr v1, v2

    iput v1, p0, Les/m7;->q:I

    .line 50
    iget-object v1, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v1, :cond_1

    .line 51
    :try_start_1
    iget-object v1, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    iget v3, p1, Lcom/esfile/screen/recorder/media/util/l;->d:I

    if-eqz p2, :cond_0

    iget-object p2, p1, Lcom/esfile/screen/recorder/media/util/l;->f:Landroid/media/MediaCodec$BufferInfo;

    iget p2, p2, Landroid/media/MediaCodec$BufferInfo;->size:I

    if-lez p2, :cond_0

    goto :goto_0

    :cond_0
    const/4 v2, 0x0

    :goto_0
    invoke-virtual {v1, v3, v2}, Lcom/esfile/screen/recorder/media/util/n;->a(IZ)V

    .line 52
    iget-object p2, p0, Les/m7;->p:Ljava/util/List;

    invoke-interface {p2, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_1

    :catch_0
    move-exception p1

    .line 53
    :try_start_2
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 54
    :cond_1
    :goto_1
    iget-boolean p1, p0, Les/m7;->l:Z

    if-eqz p1, :cond_2

    iget p1, p0, Les/m7;->q:I

    if-gtz p1, :cond_2

    const-string p1, "all buffers back"

    .line 55
    invoke-virtual {p0, p1}, Les/m7;->a(Ljava/lang/String;)V

    .line 56
    :cond_2
    monitor-exit v0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw p1
.end method

.method public a(Les/m7$h;)V
    .locals 1

    const/4 v0, 0x0

    .line 57
    invoke-virtual {p0, p1, v0}, Les/m7;->a(Les/m7$h;Landroid/os/Handler;)V

    return-void
.end method

.method public a(Les/m7$h;Landroid/os/Handler;)V
    .locals 0

    .line 58
    iput-object p1, p0, Les/m7;->C:Les/m7$h;

    if-eqz p2, :cond_0

    .line 59
    invoke-virtual {p2}, Landroid/os/Handler;->getLooper()Landroid/os/Looper;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 60
    iput-object p2, p0, Les/m7;->D:Landroid/os/Handler;

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    .line 61
    iput-object p1, p0, Les/m7;->D:Landroid/os/Handler;

    :goto_0
    return-void
.end method

.method public a(Les/m7$i;)V
    .locals 0

    .line 70
    iput-object p1, p0, Les/m7;->E:Les/m7$i;

    return-void
.end method

.method protected a(Ljava/lang/String;)V
    .locals 1

    .line 42
    invoke-virtual {p0}, Les/m7;->d()Z

    move-result v0

    invoke-static {v0, p1}, Les/m7;->a(ZLjava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v0, "mdr"

    invoke-static {v0, p1}, Lcom/esfile/screen/recorder/media/util/k;->c(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public a(Z)V
    .locals 0

    .line 13
    iput-boolean p1, p0, Les/m7;->u:Z

    return-void
.end method

.method public a(Ljava/io/FileDescriptor;)Z
    .locals 1

    .line 8
    :try_start_0
    new-instance v0, Landroid/media/MediaExtractor;

    invoke-direct {v0}, Landroid/media/MediaExtractor;-><init>()V

    iput-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    .line 9
    invoke-virtual {v0, p1}, Landroid/media/MediaExtractor;->setDataSource(Ljava/io/FileDescriptor;)V

    .line 10
    iget-object p1, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {p0, p1}, Les/m7;->a(Landroid/media/MediaExtractor;)Landroid/media/MediaFormat;

    move-result-object p1

    iput-object p1, p0, Les/m7;->t:Landroid/media/MediaFormat;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 11
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 12
    :goto_0
    iget-object p1, p0, Les/m7;->t:Landroid/media/MediaFormat;

    if-eqz p1, :cond_0

    const/4 p1, 0x1

    goto :goto_1

    :cond_0
    const/4 p1, 0x0

    :goto_1
    return p1
.end method

.method public b()Landroid/media/MediaFormat;
    .locals 1

    .line 7
    iget-object v0, p0, Les/m7;->t:Landroid/media/MediaFormat;

    return-object v0
.end method

.method public b(Z)V
    .locals 0

    .line 1
    iput-boolean p1, p0, Les/m7;->s:Z

    return-void
.end method

.method public b(Ljava/lang/String;)Z
    .locals 1

    .line 2
    :try_start_0
    new-instance v0, Landroid/media/MediaExtractor;

    invoke-direct {v0}, Landroid/media/MediaExtractor;-><init>()V

    iput-object v0, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    .line 3
    invoke-virtual {v0, p1}, Landroid/media/MediaExtractor;->setDataSource(Ljava/lang/String;)V

    .line 4
    iget-object p1, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {p0, p1}, Les/m7;->a(Landroid/media/MediaExtractor;)Landroid/media/MediaFormat;

    move-result-object p1

    iput-object p1, p0, Les/m7;->t:Landroid/media/MediaFormat;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 5
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    .line 6
    :goto_0
    iget-object p1, p0, Les/m7;->t:Landroid/media/MediaFormat;

    if-eqz p1, :cond_0

    const/4 p1, 0x1

    goto :goto_1

    :cond_0
    const/4 p1, 0x0

    :goto_1
    return p1
.end method

.method public c()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Les/m7;->z:Z

    return v0
.end method

.method protected abstract d()Z
.end method

.method public e()Z
    .locals 2

    .line 1
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-boolean v1, p0, Les/m7;->d:Z

    if-eqz v1, :cond_0

    iget-boolean v1, p0, Les/m7;->k:Z

    if-eqz v1, :cond_0

    const/4 v1, 0x1

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    :goto_0
    monitor-exit v0

    return v1

    :catchall_0
    move-exception v1

    .line 3
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public f()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-boolean v1, p0, Les/m7;->d:Z

    if-eqz v1, :cond_1

    iget-boolean v1, p0, Les/m7;->j:Z

    if-nez v1, :cond_1

    iget-boolean v1, p0, Les/m7;->k:Z

    if-eqz v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x1

    .line 3
    iput-boolean v1, p0, Les/m7;->k:Z

    .line 4
    iget-object v1, p0, Les/m7;->a:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 5
    monitor-exit v0

    return-void

    .line 6
    :cond_1
    :goto_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    .line 7
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public g()Z
    .locals 2

    .line 1
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {p0}, Les/m7;->h()V

    :cond_0
    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Les/m7;->d:Z

    .line 4
    iget-object v1, p0, Les/m7;->t:Landroid/media/MediaFormat;

    if-eqz v1, :cond_1

    .line 5
    invoke-direct {p0, v1}, Les/m7;->d(Landroid/media/MediaFormat;)V

    .line 6
    iget-object v1, p0, Les/m7;->t:Landroid/media/MediaFormat;

    invoke-virtual {p0, v1}, Les/m7;->a(Landroid/media/MediaFormat;)Lcom/esfile/screen/recorder/media/util/n;

    move-result-object v1

    iput-object v1, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v1, :cond_1

    const/4 v0, 0x1

    :cond_1
    return v0
.end method

.method public h()V
    .locals 4

    .line 1
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-boolean v1, p0, Les/m7;->j:Z

    const/4 v2, 0x1

    if-nez v1, :cond_0

    .line 3
    iput-boolean v2, p0, Les/m7;->j:Z

    .line 4
    iget-object v1, p0, Les/m7;->a:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 5
    :cond_0
    iput-boolean v2, p0, Les/m7;->l:Z

    .line 6
    iget v1, p0, Les/m7;->q:I

    if-lez v1, :cond_1

    .line 7
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "wait for all buffers back. count: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p0, Les/m7;->q:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Les/m7;->a(Ljava/lang/String;)V

    .line 8
    :cond_1
    iget-boolean v1, p0, Les/m7;->w:Z

    if-eqz v1, :cond_2

    const-string v1, "wait for breaking run work"

    .line 9
    invoke-virtual {p0, v1}, Les/m7;->a(Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 10
    :cond_2
    :goto_0
    :try_start_1
    iget-boolean v1, p0, Les/m7;->w:Z

    if-nez v1, :cond_3

    iget v1, p0, Les/m7;->q:I

    if-lez v1, :cond_4

    .line 11
    :cond_3
    iget-object v1, p0, Les/m7;->a:Ljava/lang/Object;

    const-wide/16 v2, 0xa

    invoke-virtual {v1, v2, v3}, Ljava/lang/Object;->wait(J)V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    goto :goto_0

    .line 12
    :catch_0
    :cond_4
    :try_start_2
    iget-object v1, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    const/4 v2, 0x0

    if-eqz v1, :cond_5

    .line 13
    :try_start_3
    iget-object v1, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/util/n;->k()V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    :try_start_4
    const-string v1, "release MediaCodec dec"

    .line 14
    invoke-virtual {p0, v1}, Les/m7;->a(Ljava/lang/String;)V

    .line 15
    iget-object v1, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/util/n;->h()V

    .line 16
    :goto_1
    iput-object v2, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_1

    goto :goto_3

    :catchall_0
    move-exception v1

    goto :goto_2

    :catch_1
    move-exception v1

    :try_start_5
    const-string v3, "failed stop MediaCodec"

    .line 17
    invoke-direct {p0, v3, v1}, Les/m7;->a(Ljava/lang/String;Ljava/lang/Exception;)V
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    :try_start_6
    const-string v1, "release MediaCodec dec"

    .line 18
    invoke-virtual {p0, v1}, Les/m7;->a(Ljava/lang/String;)V

    .line 19
    iget-object v1, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v1}, Lcom/esfile/screen/recorder/media/util/n;->h()V

    goto :goto_1

    :goto_2
    const-string v3, "release MediaCodec dec"

    .line 20
    invoke-virtual {p0, v3}, Les/m7;->a(Ljava/lang/String;)V

    .line 21
    iget-object v3, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    invoke-virtual {v3}, Lcom/esfile/screen/recorder/media/util/n;->h()V

    .line 22
    iput-object v2, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    .line 23
    throw v1

    .line 24
    :cond_5
    :goto_3
    iget-object v1, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    if-eqz v1, :cond_6

    .line 25
    iget-object v1, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    invoke-virtual {v1}, Landroid/media/MediaExtractor;->release()V

    .line 26
    iput-object v2, p0, Les/m7;->f:Landroid/media/MediaExtractor;

    .line 27
    :cond_6
    iget-object v1, p0, Les/m7;->p:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->clear()V

    .line 28
    monitor-exit v0

    return-void

    :catchall_1
    move-exception v1

    monitor-exit v0
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_1

    goto :goto_5

    :goto_4
    throw v1

    :goto_5
    goto :goto_4
.end method

.method public i()Z
    .locals 1

    .line 1
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Lcom/esfile/screen/recorder/media/util/n;->h()V

    .line 3
    :cond_0
    iget-object v0, p0, Les/m7;->t:Landroid/media/MediaFormat;

    invoke-virtual {p0, v0}, Les/m7;->a(Landroid/media/MediaFormat;)Lcom/esfile/screen/recorder/media/util/n;

    move-result-object v0

    iput-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v0, :cond_1

    const/4 v0, 0x1

    return v0

    :cond_1
    const/4 v0, 0x0

    return v0
.end method

.method public j()V
    .locals 2

    .line 1
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    iget-boolean v1, p0, Les/m7;->d:Z

    if-eqz v1, :cond_2

    iget-boolean v1, p0, Les/m7;->j:Z

    if-nez v1, :cond_2

    iget-boolean v1, p0, Les/m7;->k:Z

    if-nez v1, :cond_0

    goto :goto_0

    .line 3
    :cond_0
    iget-boolean v1, p0, Les/m7;->k:Z

    if-eqz v1, :cond_1

    const/4 v1, 0x0

    .line 4
    iput-boolean v1, p0, Les/m7;->k:Z

    .line 5
    :cond_1
    iget-object v1, p0, Les/m7;->a:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 6
    monitor-exit v0

    return-void

    .line 7
    :cond_2
    :goto_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    .line 8
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public k()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    const/4 v1, 0x1

    .line 2
    :try_start_0
    iput-boolean v1, p0, Les/m7;->d:Z

    const/4 v1, 0x0

    .line 3
    iput-boolean v1, p0, Les/m7;->g:Z

    .line 4
    iput-boolean v1, p0, Les/m7;->h:Z

    .line 5
    iput-boolean v1, p0, Les/m7;->j:Z

    .line 6
    iput-boolean v1, p0, Les/m7;->k:Z

    .line 7
    iput-boolean v1, p0, Les/m7;->l:Z

    const-wide/16 v1, -0x1

    .line 8
    iput-wide v1, p0, Les/m7;->i:J

    .line 9
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 10
    new-instance v0, Ljava/lang/Thread;

    const-string v1, "mDecoder"

    invoke-direct {v0, p0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void

    :catchall_0
    move-exception v1

    .line 11
    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1
.end method

.method public l()Z
    .locals 2

    .line 1
    iget-object v0, p0, Les/m7;->e:Lcom/esfile/screen/recorder/media/util/n;

    if-eqz v0, :cond_0

    .line 2
    iget-object v1, p0, Les/m7;->b:Ljava/util/HashSet;

    invoke-virtual {v0}, Lcom/esfile/screen/recorder/media/util/n;->c()Landroid/media/MediaCodecInfo;

    move-result-object v0

    invoke-virtual {v0}, Landroid/media/MediaCodecInfo;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z

    move-result v0

    xor-int/lit8 v0, v0, 0x1

    return v0

    .line 3
    :cond_0
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "should prepare first"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public run()V
    .locals 3

    .line 1
    invoke-direct {p0}, Les/m7;->r()V

    const/4 v0, 0x1

    .line 2
    iput-boolean v0, p0, Les/m7;->x:Z

    .line 3
    iput-boolean v0, p0, Les/m7;->w:Z

    .line 4
    :goto_0
    iget-boolean v0, p0, Les/m7;->j:Z

    const/4 v1, 0x0

    if-nez v0, :cond_3

    .line 5
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 6
    :goto_1
    :try_start_0
    iget-boolean v2, p0, Les/m7;->j:Z

    if-nez v2, :cond_0

    iget-boolean v2, p0, Les/m7;->k:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v2, :cond_0

    .line 7
    :try_start_1
    iget-object v2, p0, Les/m7;->a:Ljava/lang/Object;

    invoke-virtual {v2}, Ljava/lang/Object;->wait()V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_1

    .line 8
    :catch_0
    :cond_0
    :try_start_2
    monitor-exit v0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 9
    invoke-direct {p0}, Les/m7;->p()V

    .line 10
    :goto_2
    invoke-direct {p0}, Les/m7;->m()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-boolean v0, p0, Les/m7;->u:Z

    if-eqz v0, :cond_1

    goto :goto_2

    .line 11
    :cond_1
    :goto_3
    invoke-direct {p0}, Les/m7;->n()Z

    move-result v0

    if-eqz v0, :cond_2

    iget-boolean v0, p0, Les/m7;->u:Z

    if-eqz v0, :cond_2

    goto :goto_3

    .line 12
    :cond_2
    iput-boolean v1, p0, Les/m7;->x:Z

    goto :goto_0

    :catchall_0
    move-exception v1

    .line 13
    :try_start_3
    monitor-exit v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    throw v1

    .line 14
    :cond_3
    iput-boolean v1, p0, Les/m7;->w:Z

    .line 15
    invoke-virtual {p0}, Les/m7;->h()V

    .line 16
    iget-object v0, p0, Les/m7;->r:Ljava/lang/Exception;

    if-eqz v0, :cond_4

    .line 17
    invoke-direct {p0, v0}, Les/m7;->a(Ljava/lang/Exception;)V

    goto :goto_4

    .line 18
    :cond_4
    invoke-direct {p0}, Les/m7;->s()V

    :goto_4
    return-void
.end method

.method public stop()V
    .locals 3

    .line 1
    iget-object v0, p0, Les/m7;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "stop "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-boolean v2, p0, Les/m7;->j:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Les/m7;->a(Ljava/lang/String;)V

    .line 3
    iget-boolean v1, p0, Les/m7;->d:Z

    if-nez v1, :cond_0

    .line 4
    invoke-virtual {p0}, Les/m7;->h()V

    .line 5
    :cond_0
    iget-boolean v1, p0, Les/m7;->j:Z

    if-eqz v1, :cond_1

    .line 6
    monitor-exit v0

    return-void

    :cond_1
    const/4 v1, 0x1

    .line 7
    iput-boolean v1, p0, Les/m7;->j:Z

    .line 8
    iget-object v1, p0, Les/m7;->a:Ljava/lang/Object;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 9
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method
